followNodeMatrixManipulator Class Reference

#include <Camera.h>

List of all members.

Public Member Functions

 followNodeMatrixManipulator (transformAccumulator *ta)
bool handle (const osgGA::GUIEventAdapter &ea, osgGA::GUIActionAdapter &aa)
void updateTheMatrix ()
virtual void setByMatrix (const osg::Matrixd &mat)
virtual void setByInverseMatrix (const osg::Matrixd &mat)
virtual osg::Matrixd getInverseMatrix () const
virtual osg::Matrixd getMatrix () const

Protected Member Functions

 ~followNodeMatrixManipulator ()

Protected Attributes

transformAccumulator * worldCoordinatesOfNode
osg::Matrixd theMatrix


Detailed Description

followNodeMatrixManipulator class uses the matrix representing the world coordinates of a node in the scene for positioning the camera. The camera follows a vehicle object and takes its PAT values for its position.


Constructor & Destructor Documentation

followNodeMatrixManipulator::followNodeMatrixManipulator (  transformAccumulator *  ta  )  [inline]
 

followNodeMatrixManipulator::~followNodeMatrixManipulator (   )  [inline, protected]
 

destructor of the followNodeMatrixManipulator class.


Member Function Documentation

virtual osg::Matrixd followNodeMatrixManipulator::getInverseMatrix (   )  const [virtual]
 

the virtual function of osgGA::MatrixManipulator base class.

Returns:
The inverse of the theMatrix is returned.

virtual osg::Matrixd followNodeMatrixManipulator::getMatrix (   )  const [virtual]
 

is the virtual function of osgGA::MatrixManipulator base class.

Returns:
The theMatrix is returned.

bool followNodeMatrixManipulator::handle (  const osgGA::GUIEventAdapter &  ea,
osgGA::GUIActionAdapter &  aa
) 
 

handle function checks for selected GUI events and responds to them. For our class, the only GUI event we need to respond to is the 'FRAME' event. At every frame event we need to set our copy of the matrix to be used to position the camera equal to the matrix that represents the transformAccumulator matrix

virtual void followNodeMatrixManipulator::setByInverseMatrix (  const osg::Matrixd &  mat  )  [virtual]
 

the virtual function of osgGA::MatrixManipulator base class.

Parameters:
mat The inverse of the mat variable is set to the theMatrix field of the class

virtual void followNodeMatrixManipulator::setByMatrix (  const osg::Matrixd &  mat  )  [virtual]
 

the virtual function of osgGA::MatrixManipulator base class.

Parameters:
mat variable is set to the theMatrix field of the class

void followNodeMatrixManipulator::updateTheMatrix (   ) 
 

a function changes the matrix for every FRAME callback


Member Data Documentation

osg::Matrixd followNodeMatrixManipulator::theMatrix [protected]
 

a variable that keeps the matrix of the camera node.

transformAccumulator* followNodeMatrixManipulator::worldCoordinatesOfNode [protected]
 

a variable that keeps the coordinates of the node that is going to be followed.


The documentation for this class was generated from the following file:
Generated on Sun May 28 18:44:00 2006 by  doxygen 1.4.6-NO